package com.zzc.controller;

import com.zzc.common.JsonResult;
import com.zzc.common.TableResult;
import com.zzc.pojo.ApiSystemparam;
import com.zzc.pojo.ApiSystemparam;
import com.zzc.service.ApiMappingService;
import com.zzc.service.SystemParatersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author zhouzhicheng
 * @version 1.0  2020/12/29
 */
@RestController
@RequestMapping("/sys/systemparaters")
public class SystemParatersController {
    @Autowired
    private SystemParatersService systemParatersService;
    @RequestMapping("/table")
    public TableResult getSystemParaters(Integer page,Integer limit,String name, Integer state){
      return systemParatersService.getSystemParaters(page, limit, name, state);
    }
    @RequestMapping("/del")
    public JsonResult deleteSystemParaterssById(Integer[] ids){
        return systemParatersService.deleteSystemParatersById(ids);
    }
    @RequestMapping("/add")
    public JsonResult addSystemParaters(ApiSystemparam SystemParaters){
        return systemParatersService.insertSelective(SystemParaters);
    }
    @RequestMapping("/update")
    public JsonResult updateSystemParaters(ApiSystemparam SystemParaters){
        return systemParatersService.updateByPrimaryKeySelective(SystemParaters);
    }
}
